#include <REG52.H>
#include "Delay.h"

sbit P0_1 = P0^1;
sbit P0_2 = P0^2;
sbit P0_3 = P0^3;
sbit P0_4 = P0^4;


unsigned char Key()
{
	unsigned char KeyNumber=0;
	if(P0_1==1){KeyNumber=1;}
	if(P0_2==1){KeyNumber=2;}
	if(P0_3==1){KeyNumber=3;}
	if(P0_4==1){KeyNumber=4;}
	
	return KeyNumber;
}
